<html>
 <head>
        <title>[var.TITLE]</title>
        <link href="[var.ROOT_CSS_DIR]/main.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">
        <link href="[var.ROOT_CSS_DIR]/facet/style.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">
        <script type="text/javascript" src="[var.ROOT_DIR]js/common.js"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/doiMenuDOM.js"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/functions.js"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jsmenu.php"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jsmenu.cfg"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jsformgrid.php?session=[var.SessionVar]"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jsmasks.js"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jsverify.php?session=[var.SessionVar]"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jsinit.php?session=[var.SessionVar]"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jquery.js"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jsformgridnew.js"></script>
        
 </head>
 <body bgcolor="FFFFFF" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">

         <table border="0" cellspacing="0" cellpadding="0" width="100%" align="[var.POSITION]">
                <tr>
                        <td>[tbs_include.onshow;file=[var.HTMLHeader];getob;]</td>
                </tr>
                <tr>
                        <td>
                        <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                <tr>
                                        <td class="mainmenu2"><img src="images/spacer.gif" height="1" width="1"></td>
                                </tr>
                                <tr>
                                        <td background="[var.ROOT_IMG_DIR]/back-menu.gif">
                                        <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                                <tr>
                                                        <td>
                                                        <script language="JavaScript" type="text/JavaScript">menu.Build();</script>
                                                  </td>
                                                  <td class="head-login">Login as [var.USERPROFILE_NAME]</td>
                                                </tr>
                                          </table>
                                        </td>
                                </tr>
                                <tr>
                                        <td class="mainmenu2"><img src="images/spacer.gif" height="1" width="1"></td>
                                </tr>
                        </table>
                        </td>
                </tr>
                <tr height="100%">
                        <td>
                        <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
                                <tr valign="top">
                                        <td width="100%">
                                                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                                        <tr>
                                                                <td class="head-path"></td>
                                                                <td class="corner-date">[var.CORNER_DATE]</td>
                                                        </tr>
                                                </table>
                                                <table border="0" cellspacing="0" cellpadding="5" width="100%">
                                                        <tr>
                                                                <td class="FacetHeaderContent" >.:[var.SubHeaderTitle]:.</td>
                                                        </tr>
                                                </table>

                                                <table border="0" cellspacing="0" cellpadding="5" width="100%">
                                                <form method="post" action="[var.FormAction]" name="[var.HTMLFormName]" ONSUBMIT="if (this.submitted) return true; else return false;">
                                                        <tr>
                                                          <td class="contentTitleMarketing">
                                                                Menu
                                                          </td>
                                                        </tr>
                                                        <tr>
                                                          <td class="contentMarketing">

                                                                <table cellspacing="2" cellpadding="0">
                                                                 <tr>
                                                                   <td>
                                                                    <input type="button" name="Action" value="<<Back" class="button" onClick="self.location.replace('[sys.script_name]')">
                                                                   </td>
                                                                   <td>
																	 <input name="FormAction" type="submit" value="Save" class="button" ONCLICK="this.form.submitted = true; ">
																   </td>
                                                                   <td>
                                                                    <input type="button" name="Action" value="Done" class="button" onClick="self.location.replace('[var.SERVER_URL]')">
                                                                   </td>
                                                                 


                                                                 </tr>
                                                                </table>
                                                          </td>
                                                        </tr>
                                                        <tr>
                                                          <td class="contentMarketing">
                                                        <!-- FORM SECTION -->
                                                        <table border="0" cellspacing="0" cellpadding="0" align="left">
                                                        
                                                        
                                                                  <tr>
                                                                    <td class="fieldCaption" align="right">Prospect ID</td>
                                                                    <td class="fieldCaption">:</td>
                                                                    <td class="fieldCaption">
                                                                      [headblv.project_id;noerr]
                                                                      <input type="hidden" name="project_id" value="[headblv.project_id;noerr]">
                                                                    </td>
                                                                    <!--<td class="fieldCaption"><input type="text" name="(bln.project_id)" value="[headblv.project_id;noerr]" maxlength="255" size="10" onblur='[var.InitFunction]' onkeyup="this.value=this.value.toUpperCase()" class="input" [tbs_check;if [var.FormMode]=Edit;then 'readonly';else '']></td>-->
                                                                  </tr>
                                                                  <tr>
                                                                    <td class="fieldCaption" align="right">Prospect Name</td>
                                                                    <td class="fieldCaption">:</td>
                                                                    <td class="fieldCaption">[headblv.project_name;noerr]</td>
                                                                  </tr>
                                                                  <tr>
                                                                    <td class="fieldCaption" align="right">Est. Start Date</td>
                                                                    <td class="fieldCaption">:</td>
                                                                    <td class="fieldCaption">
                                                                        [headblv.start_date;frm='dd/mm/yyyy';noerr;]
                                                                    </td>
                                                                  </tr>
                                                                  <tr>
                                                                    <td class="fieldCaption" align="right">Est. End Date</td>
                                                                    <td class="fieldCaption">:</td>
                                                                    <td class="fieldCaption">
                                                                        [headblv.end_date;frm='dd/mm/yyyy';noerr;]
                                                                    </td>
                                                                  </tr>
                                                                  <tr>
                                                                    <td class="fieldCaption" align="right">Prospect Classification</td>
                                                                    <td class="fieldCaption">:</td>
                                                                    <td class="fieldCaption">
												                        [var.select_projgroup;htmlconv=no;]
                                                                    </td>
                                                                  </tr>
                                                                  <tr>
                                                                    <td class="fieldCaption" align="right">Prospect Location</td>
                                                                    <td class="fieldCaption">:</td>
                                                                    <td class="fieldCaption">[headblv.project_location;noerr;]</td>
                                                                  </tr>
                                                                  <tr>
                                                                    <td class="fieldCaption" align="right">Prospect Remarks</td>
                                                                    <td class="fieldCaption">:</td>
                                                                    <td class="fieldCaption">[headblv.project_remarks;noerr;]</td>
                                                                  </tr>
                                                                  <tr>
                                                                    <td class="fieldCaption" align="right">Prospect Owner</td>
                                                                    <td class="fieldCaption">:</td>
                                                                    <td class="fieldCaption">[headblv.project_owner;noerr]</td>
                                                                  </tr>
                                                                  
                                                                   <tr>
                                                                    <td class="fieldCaption" align="right">Assign To Project</td>
                                                                    <td class="fieldCaption">:</td>
                                                                    <td class="fieldCaption">
																		<select name="assign_to_project" class="input">
																			<option value=''>--Select--</option>
																			<option value='assigned'>Assigned</option>
																			<option value='terminated'>Terminated</option>
																			<option>[headblv.assign_to_project;selected]</option>
																		</select>
                                                                    </td>
                                                                  </tr>



                                                                 <!--Edited by Adit van Smith-->

                                                         </table>
                                                         <!-- FORM SECTION -->
                                                                </td>
                                                        </tr>
                                                </table>
                                                
                                                <!--GRID-->
                                                
                                                <hr size="1" color="DFDFDF">
                                                <div id="spanHeader" style="height: 25px; vertical-align: top; overflow-y: noscroll;">
                                                 
                                              
                                                <table border="0" width="100%" cellpadding="3" cellspacing="1" class="FacetFormTABLEMarketing" align="left">
                                                
                                                        <tr>
                                                                <td nowrap class="FacetColumnTDMarketing" align="center" width="45">No.</td>
                                                                <td nowrap class="FacetColumnTDMarketing" align="center">Customer</td>
                                                        </tr>
                                                      
                                                </table>
                                                </div>
                                                
                                                 
                                               <table border="0" width="100%" cellpadding="3" cellspacing="1" class="FacetFormTABLEMarketing" align="left">
                                                
                                                        <tr>
                                                                <td nowrap class="FacetColumnTDMarketing" align="center" width="145">&nbsp;</td> 
                                                                <td nowrap class="FacetColumnTDMarketing" align="center" width="145">Code</td>
                                                                <td nowrap class="FacetColumnTDMarketing" align="center" width="318">Name</td>
                                                                <td nowrap class="FacetColumnTDMarketing" align="center">&nbsp;</td>
                                                        </tr>
                                                      
                                                </table>
                                                




                                                <div id="spanDetail" class="tariffgrid">

                                                    <!--Edited by van Smith-->

                                                    <table border="0" width="100%" cellpadding="3" cellspacing="1" class="FacetFormTABLEMarketing" align="left">
                                                    
                                                        <tr id="[blg.#]" style="display:[blg._display;noerr]">
                                                               
                                                                
                                                                <td nowrap class="FacetDataTDMarketing" align="right" width="45" align="right">
                                                                  [blg.#;block=tr].
                                                                  <input type="hidden" name="project_id[blg.#]" value="[tbs_check;if [var.project_id;noerr]!='';then [var.project_id;noerr] ;else '']">
                                                                </td>

                                                                <td class="FacetDataTDMarketing" align="left" width="570">
                                                                     
                                                                     <!--<input type="text" name="tes_[blg.#]" id="[blg.#]" class="textBox">--->
                                                                                                                                                                                                               
                                                                     <select name="debturList[blg.#]" class="gridBox" id="input" onchange="GetReceived(this.value,'[blg.#]');" disabled>
																		<option value="" selected>Select Value</option>
																		<option value="1">Customer</option>
																	 </select>
																	 <input type="text" name="debtur[blg.#]" value="[blg.debtur;noerr]" id="input" class="counted" width="13" disabled>
																	 <input type="text" name="debnam[blg.#]" value="[blg.debnam;noerr]" maxlength="255" size="30" class="input" disabled>
																	 
                                                                </td>
                                                                
                                                                <td class="FacetDataTDMarketing" align="left">
                                                                   &nbsp;
                                                                </td>

                                                            </tr>
                                                    </table>

                                                    <!--End Edited by van Smith-->

                                                </div>

                                                <!--END GRID-->
                                                
                                                <!--BUTTON-->
                                                <div id="spanButton" style="height: 35px; vertical-align: top; overflow-y: noscroll;">
                                                <table border="0" width="100%" cellpadding="3" cellspacing="1" class="FacetFormTABLEMarketing" align="left">
                                                        <tr>
                                                            <td align="right" class="FacetColumnTDMarketing">

                                                                   <table border="0" cellspacing="2" cellpadding="0">
                                                                           <tr>
                                                                                  
                                                                                   <td>
                                                                                     <input name="FormAction" type="submit" value="Save" class="button" ONCLICK="this.form.submitted = true;">
                                                                                   </td>
                                                                                   
                                                                                   <td>
                                                                                     <input name="FormAction" type="submit" value="Cancel" class="button" onClick="self.location.replace('[sys.script_name]')">
                                                                                   </td>
                                                                           </tr>
                                                                   </table>


                                                            </td>
                                                                </td>
                                                        </tr>
                                                        </form>
                                                </table>
                                                </div>
                                                
                                                <!--END BUTTON-->
                                                
                                                
                                        </td>
                                </tr>
                        </table>
                        </td>
                </tr>

                <tr>
                        <td>
                        <br>
                        <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                <tr>
                                        <td class="footer1"><img src="images/spacer.gif" height="1" width="1"></td>
                                </tr>
                                <!--tr>
                                        <td class="footer2">Prototype Test - Web Application</td>
                                </tr-->
                        </table>
                        </td>
                </tr>
         </table>
 </body>
<iframe width="174" height="189" name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="[var.ROOT_DIR]js/Calendar/pop/ipopeng.htm" scrolling="no" frameborder="0" style="LEFT: -500px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; Z-INDEX: 999"></iframe>
 <script>

 $(document).ready(function(){
    $('#njajal2').blur(function(){
            alert( $('#njajal').html() );
    });
});

 [var.InitFunction]
 SetDK(1,'K');
 document.[var.HTMLFormName].total_trans.value = SumTotal("jumlah");

 function SetDK(idx,val) {
   //eval("dk = document.[var.HTMLFormName].dk"+idx+".value;");
   //if (dk=='') eval("document.[var.HTMLFormName].dk"+idx+".value='"+val+"';");
   alert("aa");
   return true;
 }

function EditReccount(test){

}

 function GetReceived(val,no_urut) {
	 
	 var debcount = "";
	  	
	 $(document).ready(function(){
        			  
		$(".counted:visible").each(function(n) {			
			
			if(this.value != "")
			{
			  debcount+=$.trim(this.value)+"-";
			}
		});
    		
	});	  
    newwin = window.open("ais_transaction_custlist_2.php?FormName=[var.HTMLFormName]&no_urut="+no_urut+"&debcount="+debcount,"toolcalc","height=400,width=640,noscroll,resizable");             
 }




 function OpenPrincipal (number) {
        newwin = window.open("ais_transaction_receipt_entry.php?PageMode=Page2&FormName=[var.HTMLFormName]&Number="+number,"vessel","height=105,width=300,noscroll,noresizable");
 }

 function OpenRemark (number) {
        newwin = window.open("ais_transaction_dn.php?PageMode=Remark&FormName=[var.HTMLFormName]&Number="+number,"remarks","height=105,width=300,noscroll,noresizable");
 }

 function OpenPrint (number) {
        newwin = window.open("ais_transaction_dn.php?PageMode=PrintPreview&nobkt="+number,"print","height=650,width=600,noscroll,noresizable");
 }


 function GetSkada() {
         skada1 = document.[var.HTMLFormName].thbl.value;
         if (skada1.length) LoadRPC ("iLoader", "[var.FileName]", "thbl="+document.[var.HTMLFormName].thbl.value);
 }


 function GetTotal () {
         document.[var.HTMLFormName].total_trans.value = SumTotal("jumlah");
 }



 function getCashType(){
    var frm = document.[var.HTMLFormName].cash_type;
    return frm.options[frm.selectedIndex].value;
 }

var reccount = 1;
//if (reccount==0) reccount=1; else reccount=5;
var last;

function AddFormGridProject (cname,firstelemen) {
    if (VerifyGridProject(reccount)==false) {
        return false
    }

    $(".gridBox:visible").each(function(n) {
        n = n+1;
        reccount = n;
    });

    //reccount = 5;
    reccount = parseInt(reccount)+1;

    //alert("reccount: " + reccount);

    if (reccount>=100) {
        cname.disabled = true;
    }

    var objrow = document.getElementById(reccount);

    if (objrow.style.display == 'none') {
        objrow.style.display = '';
    }

    eval(firstelemen+''+reccount+'.focus()');

    return false;
}

/*
function AddFormGridProject (cname,firstelemen) {
    if (VerifyGridProject(reccount)==false) {
        return false
    }

    $(".textBox:visible").each(function(n) {
        n = n+1;
        reccount = n;
    });

    //reccount = 5;
    reccount = parseInt(reccount)+1;

    //alert("reccount: " + reccount);

    if (reccount>=100) {
        cname.disabled = true;
    }

    var objrow = document.getElementById(reccount);

    if (objrow.style.display == 'none') {
        objrow.style.display = '';
    }

    eval(firstelemen+''+reccount+'.focus()');

    return false;
}
*/


function VerifyGridProject (x) {
    err_message = '';
    last_focus =0;
    if (err_message.length) {//alert(err_message);
    return false} else return true
}

function CheckAllGrid(firstelemen) {
        for (n=1;n<reccount;n++) {
                if (!VerifyGrid(n)) return false;
        }
        eval('fl = document.'+firstelemen+reccount+'.value');
        if (fl.length)
                if (!VerifyGrid(reccount)) return false;
return true;}

 </script>
</html>
